/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Interface_Pasien.java
 *
 * Created on 19 Apr 12, 1:59:27
 */
package Com.Interface;

import Com.Controller.MainController;
import java.awt.event.KeyEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author Ardha
 */
public class Interface_Pasien extends javax.swing.JFrame {

    /** Creates new form Interface_Pasien */
    public Interface_Pasien() {
        addWindowListener(new WindowAdapter() {

            @Override
            public void windowOpened(WindowEvent e) {
                setExtendedState(MAXIMIZED_BOTH);
            }
        });
        initComponents();
        bGroupBTA1.add(btaSewaktu1a_radio);
        bGroupBTA1.add(btaSewaktu1b_radio);
        bGroupBTA2.add(btaPagi1a_radio);
        bGroupBTA2.add(btaPagi1b_radio);
        bGroupBTA3.add(btaSewaktu2a_radio);
        bGroupBTA3.add(btaSewaktu2b_radio);
        bGroupRongnt.add(rontgenA_radio);
        bGroupRongnt.add(rontgenB_radio);
        notifikasiLabel.setVisible(false);
        rekamMedis_Panel.setVisible(false);
        nilaiSaranPerbaikan_Label.setVisible(false);
        this.setSize(1007, 600);
        cekLab_Panel.setVisible(false);
        btA_pANEL.setVisible(false);
        rontgen_Panel.setVisible(false);
        simpanSaran_Button.setEnabled(false);
        sisaField.setEditable(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        frame_Panel = new javax.swing.JPanel();
        header = new javax.swing.JPanel();
        title_Label = new javax.swing.JLabel();
        pasien_Panel = new javax.swing.JPanel();
        nilaiAlamat_Label = new javax.swing.JLabel();
        nilaiNama_Label = new javax.swing.JLabel();
        id_Label = new javax.swing.JLabel();
        nilaiJenisKelamin_Label = new javax.swing.JLabel();
        id_TextField = new javax.swing.JTextField();
        jenisKelamin_Label = new javax.swing.JLabel();
        nama_Label = new javax.swing.JLabel();
        alamat_Label = new javax.swing.JLabel();
        rekamMedis_Panel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        rekamMedis_Table = new javax.swing.JTable();
        notifikasiLabel = new javax.swing.JLabel();
        umur_label = new javax.swing.JLabel();
        berat_badan_label = new javax.swing.JLabel();
        nilaiUmurLabel = new javax.swing.JLabel();
        nilaiBeratBadanLabel = new javax.swing.JLabel();
        tanggal_lahir_label = new javax.swing.JLabel();
        nilaitglLahir = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        gejala_Panel = new javax.swing.JPanel();
        gejala1_CheckBox = new javax.swing.JCheckBox();
        gejala2_CheckBox = new javax.swing.JCheckBox();
        gejala3_CheckBox = new javax.swing.JCheckBox();
        gejala4_CheckBox = new javax.swing.JCheckBox();
        gejala5_CheckBox = new javax.swing.JCheckBox();
        gejala6_CheckBox = new javax.swing.JCheckBox();
        gejala7_CheckBox = new javax.swing.JCheckBox();
        gejala8_CheckBox = new javax.swing.JCheckBox();
        gejala9_CheckBox = new javax.swing.JCheckBox();
        prosesGejala_Button = new javax.swing.JButton();
        lineGejala_Separator = new javax.swing.JSeparator();
        cancelGejala_Button = new javax.swing.JButton();
        beratBadanLabel = new javax.swing.JLabel();
        beratBadanText = new javax.swing.JTextField();
        sisa = new javax.swing.JLabel();
        sisaField = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        cekLab_Panel = new javax.swing.JPanel();
        rontgen_Panel = new javax.swing.JPanel();
        rontgenB_radio = new javax.swing.JRadioButton();
        rontgenA_radio = new javax.swing.JRadioButton();
        pesanRontgen_Label = new javax.swing.JLabel();
        nilaiHasilRontgen_Label = new javax.swing.JLabel();
        comboBox_Paru = new javax.swing.JComboBox();
        btA_pANEL = new javax.swing.JPanel();
        btaSewaktu1_Label = new javax.swing.JLabel();
        btaPagi_Label = new javax.swing.JLabel();
        btaSewaktu2_Label = new javax.swing.JLabel();
        btaSewaktu1a_radio = new javax.swing.JRadioButton();
        btaSewaktu1b_radio = new javax.swing.JRadioButton();
        btaPagi1b_radio = new javax.swing.JRadioButton();
        btaPagi1a_radio = new javax.swing.JRadioButton();
        btaSewaktu2a_radio = new javax.swing.JRadioButton();
        btaSewaktu2b_radio = new javax.swing.JRadioButton();
        jumlahBTA_Label = new javax.swing.JLabel();
        nilaiJumlahBTAlama_Label = new javax.swing.JLabel();
        jumlahBTAbaruLabel = new javax.swing.JLabel();
        nilaiJumlahBTAbaru_Label = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        nilai_NoRegLabText = new javax.swing.JTextField();
        saran_Panel = new javax.swing.JPanel();
        saran_Label = new javax.swing.JLabel();
        nilaiSaran_Label = new javax.swing.JLabel();
        simpanSaran_Button = new javax.swing.JButton();
        nilaiSaranPerbaikan_Label = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistem Pembantu Diagnosa dan Pengawasan Penyakit TBC Dewasa");

        jScrollPane1.setPreferredSize(new java.awt.Dimension(974, 500));

        frame_Panel.setBackground(new java.awt.Color(255, 255, 255));

        header.setBackground(new java.awt.Color(255, 255, 255));
        header.setPreferredSize(new java.awt.Dimension(555, 145));

        title_Label.setBackground(new java.awt.Color(153, 255, 153));
        title_Label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        title_Label.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Com/Image/header.PNG"))); // NOI18N

        javax.swing.GroupLayout headerLayout = new javax.swing.GroupLayout(header);
        header.setLayout(headerLayout);
        headerLayout.setHorizontalGroup(
            headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, headerLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(title_Label, javax.swing.GroupLayout.DEFAULT_SIZE, 939, Short.MAX_VALUE)
                .addContainerGap())
        );
        headerLayout.setVerticalGroup(
            headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(headerLayout.createSequentialGroup()
                .addComponent(title_Label, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pasien_Panel.setBackground(new java.awt.Color(255, 255, 255));
        pasien_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Pasien", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 18), new java.awt.Color(0, 153, 51))); // NOI18N

        nilaiAlamat_Label.setText("Alamat_Pasien");

        nilaiNama_Label.setText("Nama_Pasien");

        id_Label.setFont(new java.awt.Font("Tahoma", 1, 11));
        id_Label.setText("ID");

        nilaiJenisKelamin_Label.setText("Jenis_Kelamin_Pasien");

        id_TextField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                id_TextFieldKeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                id_TextFieldKeyTyped(evt);
            }
        });

        jenisKelamin_Label.setFont(new java.awt.Font("Tahoma", 1, 11));
        jenisKelamin_Label.setText("Jenis Kelamin");

        nama_Label.setFont(new java.awt.Font("Tahoma", 1, 11));
        nama_Label.setText("Nama");

        alamat_Label.setFont(new java.awt.Font("Tahoma", 1, 11));
        alamat_Label.setText("Alamat");

        rekamMedis_Panel.setBackground(new java.awt.Color(255, 255, 255));
        rekamMedis_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Rekam Medis", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 14))); // NOI18N

        rekamMedis_Table.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "No.", "Kode kategori", "Tanggal", "Tipe", "No. regstrasi lab", "Tanggal cek lab", "Jumlahl BTA", "Rontgen", "Berat badan", "Sisa obat"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        rekamMedis_Table.setEnabled(false);
        rekamMedis_Table.getTableHeader().setResizingAllowed(false);
        rekamMedis_Table.getTableHeader().setReorderingAllowed(false);
        jScrollPane2.setViewportView(rekamMedis_Table);
        rekamMedis_Table.getColumnModel().getColumn(0).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(1).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(2).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(3).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(4).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(5).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(6).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(7).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(8).setResizable(false);
        rekamMedis_Table.getColumnModel().getColumn(9).setResizable(false);

        javax.swing.GroupLayout rekamMedis_PanelLayout = new javax.swing.GroupLayout(rekamMedis_Panel);
        rekamMedis_Panel.setLayout(rekamMedis_PanelLayout);
        rekamMedis_PanelLayout.setHorizontalGroup(
            rekamMedis_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rekamMedis_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 890, Short.MAX_VALUE)
                .addContainerGap())
        );
        rekamMedis_PanelLayout.setVerticalGroup(
            rekamMedis_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rekamMedis_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                .addContainerGap())
        );

        notifikasiLabel.setForeground(new java.awt.Color(255, 0, 0));
        notifikasiLabel.setText("*Pasien baru dan belum terdaftar pada database rekam medis penyakit TBC penderita dewasa");

        umur_label.setFont(new java.awt.Font("Tahoma", 1, 11));
        umur_label.setText("Umur");

        berat_badan_label.setFont(new java.awt.Font("Tahoma", 1, 11));
        berat_badan_label.setText("Berat Badan");

        nilaiUmurLabel.setText("Umur_Pasien");

        nilaiBeratBadanLabel.setText("Berat_Badan_Pasien");

        tanggal_lahir_label.setFont(new java.awt.Font("Tahoma", 1, 11));
        tanggal_lahir_label.setText("Tanggal Lahir");

        nilaitglLahir.setText("Tanggal_Lahir_Pasien");

        jLabel2.setText("Kg");

        jLabel3.setText("Tahun");

        javax.swing.GroupLayout pasien_PanelLayout = new javax.swing.GroupLayout(pasien_Panel);
        pasien_Panel.setLayout(pasien_PanelLayout);
        pasien_PanelLayout.setHorizontalGroup(
            pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pasien_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rekamMedis_Panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(pasien_PanelLayout.createSequentialGroup()
                        .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jenisKelamin_Label)
                            .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(id_Label, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(nama_Label, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(alamat_Label))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nilaiJenisKelamin_Label)
                            .addGroup(pasien_PanelLayout.createSequentialGroup()
                                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(id_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(nilaiNama_Label)
                                    .addComponent(nilaiAlamat_Label))
                                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(pasien_PanelLayout.createSequentialGroup()
                                        .addGap(53, 53, 53)
                                        .addComponent(notifikasiLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 545, Short.MAX_VALUE))
                                    .addGroup(pasien_PanelLayout.createSequentialGroup()
                                        .addGap(168, 168, 168)
                                        .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(pasien_PanelLayout.createSequentialGroup()
                                                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(berat_badan_label)
                                                    .addComponent(umur_label))
                                                .addGap(25, 25, 25))
                                            .addGroup(pasien_PanelLayout.createSequentialGroup()
                                                .addComponent(tanggal_lahir_label)
                                                .addGap(18, 18, 18)))
                                        .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(pasien_PanelLayout.createSequentialGroup()
                                                .addComponent(nilaiUmurLabel)
                                                .addGap(18, 18, 18)
                                                .addComponent(jLabel3))
                                            .addGroup(pasien_PanelLayout.createSequentialGroup()
                                                .addComponent(nilaiBeratBadanLabel)
                                                .addGap(10, 10, 10)
                                                .addComponent(jLabel2))
                                            .addComponent(nilaitglLahir))
                                        .addGap(215, 215, 215)))))))
                .addContainerGap())
        );
        pasien_PanelLayout.setVerticalGroup(
            pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pasien_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(id_Label)
                    .addComponent(notifikasiLabel)
                    .addComponent(id_TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nama_Label)
                    .addComponent(nilaiNama_Label)
                    .addComponent(tanggal_lahir_label)
                    .addComponent(nilaitglLahir))
                .addGap(6, 6, 6)
                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(alamat_Label)
                    .addComponent(nilaiAlamat_Label)
                    .addComponent(nilaiUmurLabel)
                    .addComponent(umur_label)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pasien_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jenisKelamin_Label)
                    .addComponent(nilaiJenisKelamin_Label)
                    .addComponent(berat_badan_label)
                    .addComponent(nilaiBeratBadanLabel)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rekamMedis_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        gejala_Panel.setBackground(new java.awt.Color(255, 255, 255));
        gejala_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Gejala", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 18), new java.awt.Color(0, 153, 51))); // NOI18N
        gejala_Panel.setPreferredSize(new java.awt.Dimension(555, 197));

        gejala1_CheckBox.setText("Batuk terus menerus selama 3 minggu");

        gejala2_CheckBox.setText("Batuk berdahak");
        gejala2_CheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gejala2_CheckBoxActionPerformed(evt);
            }
        });

        gejala3_CheckBox.setText("Dahak bercampur darah");

        gejala4_CheckBox.setText("Sesak nafas");

        gejala5_CheckBox.setText("Nyeri di dada");

        gejala6_CheckBox.setText("Badan lemah");

        gejala7_CheckBox.setText("Nafsu makan turun");

        gejala8_CheckBox.setText("Berat badan turun");

        gejala9_CheckBox.setText("Demam meriang selama satu bulan");

        prosesGejala_Button.setText("Proses");
        prosesGejala_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                prosesGejala_ButtonActionPerformed(evt);
            }
        });

        cancelGejala_Button.setText("Batal");
        cancelGejala_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelGejala_ButtonActionPerformed(evt);
            }
        });

        beratBadanLabel.setText("Berat Badan");

        beratBadanText.setText("Kg");
        beratBadanText.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                beratBadanTextFocusGained(evt);
            }
        });
        beratBadanText.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                beratBadanTextKeyReleased(evt);
            }
        });

        sisa.setText("Sisa Obat");

        sisaField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                sisaFieldKeyReleased(evt);
            }
        });

        jLabel5.setForeground(new java.awt.Color(255, 0, 0));
        jLabel5.setText("*pengobatan");

        javax.swing.GroupLayout gejala_PanelLayout = new javax.swing.GroupLayout(gejala_Panel);
        gejala_Panel.setLayout(gejala_PanelLayout);
        gejala_PanelLayout.setHorizontalGroup(
            gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, gejala_PanelLayout.createSequentialGroup()
                .addContainerGap(530, Short.MAX_VALUE)
                .addComponent(prosesGejala_Button)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(cancelGejala_Button)
                .addGap(280, 280, 280))
            .addGroup(gejala_PanelLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(gejala1_CheckBox)
                    .addComponent(gejala3_CheckBox)
                    .addComponent(gejala2_CheckBox))
                .addGap(43, 43, 43)
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(gejala5_CheckBox)
                    .addComponent(gejala4_CheckBox)
                    .addComponent(gejala6_CheckBox))
                .addGap(110, 110, 110)
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(gejala9_CheckBox)
                    .addGroup(gejala_PanelLayout.createSequentialGroup()
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(gejala7_CheckBox)
                            .addComponent(gejala8_CheckBox))
                        .addGap(126, 126, 126)
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(beratBadanLabel)
                            .addComponent(sisa))
                        .addGap(18, 18, 18)
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(sisaField)
                            .addComponent(beratBadanText, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5)))
                .addContainerGap())
            .addGroup(gejala_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lineGejala_Separator, javax.swing.GroupLayout.DEFAULT_SIZE, 922, Short.MAX_VALUE)
                .addContainerGap())
        );
        gejala_PanelLayout.setVerticalGroup(
            gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(gejala_PanelLayout.createSequentialGroup()
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(gejala1_CheckBox)
                    .addComponent(gejala4_CheckBox)
                    .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(gejala7_CheckBox)
                        .addComponent(beratBadanLabel)
                        .addComponent(beratBadanText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(gejala_PanelLayout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(gejala2_CheckBox)
                            .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(gejala5_CheckBox)
                                .addComponent(gejala8_CheckBox)))
                        .addGap(7, 7, 7)
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(gejala3_CheckBox)
                            .addComponent(gejala6_CheckBox)
                            .addComponent(gejala9_CheckBox)))
                    .addGroup(gejala_PanelLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(sisa)
                            .addComponent(sisaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5))))
                .addGap(8, 8, 8)
                .addComponent(lineGejala_Separator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(gejala_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cancelGejala_Button)
                    .addComponent(prosesGejala_Button))
                .addGap(33, 33, 33))
        );

        cekLab_Panel.setBackground(new java.awt.Color(255, 255, 255));
        cekLab_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Hasil Cek Lab", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 18), new java.awt.Color(0, 153, 51))); // NOI18N
        cekLab_Panel.setPreferredSize(new java.awt.Dimension(440, 180));

        rontgen_Panel.setBackground(new java.awt.Color(255, 255, 255));
        rontgen_Panel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Rontgen", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 14))); // NOI18N
        rontgen_Panel.setMaximumSize(new java.awt.Dimension(327, 167));
        rontgen_Panel.setPreferredSize(new java.awt.Dimension(360, 167));

        rontgenB_radio.setText("-");
        rontgenB_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rontgenB_radioItemStateChanged(evt);
            }
        });

        rontgenA_radio.setText("+");
        rontgenA_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                rontgenA_radioItemStateChanged(evt);
            }
        });

        pesanRontgen_Label.setForeground(new java.awt.Color(255, 0, 0));
        pesanRontgen_Label.setText("*Dikosongi jika pasien tidak melakukan rontgen");
        pesanRontgen_Label.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        pesanRontgen_Label.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        nilaiHasilRontgen_Label.setFont(new java.awt.Font("Tahoma", 1, 11));

        comboBox_Paru.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ekstra Paru Berat/Bukan Ekstra Paru", "Ekstra Paru Ringan" }));
        comboBox_Paru.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                comboBox_ParuItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout rontgen_PanelLayout = new javax.swing.GroupLayout(rontgen_Panel);
        rontgen_Panel.setLayout(rontgen_PanelLayout);
        rontgen_PanelLayout.setHorizontalGroup(
            rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rontgen_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pesanRontgen_Label, javax.swing.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)
                    .addGroup(rontgen_PanelLayout.createSequentialGroup()
                        .addGroup(rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(rontgenB_radio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(rontgenA_radio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nilaiHasilRontgen_Label, javax.swing.GroupLayout.DEFAULT_SIZE, 260, Short.MAX_VALUE)
                            .addComponent(comboBox_Paru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())))
        );
        rontgen_PanelLayout.setVerticalGroup(
            rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(rontgen_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rontgenA_radio)
                    .addComponent(comboBox_Paru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(rontgen_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(nilaiHasilRontgen_Label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(rontgenB_radio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pesanRontgen_Label)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btA_pANEL.setBackground(new java.awt.Color(255, 255, 255));
        btA_pANEL.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "BTA", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Arial", 1, 14))); // NOI18N
        btA_pANEL.setPreferredSize(new java.awt.Dimension(360, 167));

        btaSewaktu1_Label.setText("BTA Sewaktu");

        btaPagi_Label.setText("BTA Pagi");

        btaSewaktu2_Label.setText("BTA Sewaktu");

        btaSewaktu1a_radio.setText("+");
        btaSewaktu1a_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaSewaktu1a_radioItemStateChanged(evt);
            }
        });

        btaSewaktu1b_radio.setText("-");
        btaSewaktu1b_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaSewaktu1b_radioItemStateChanged(evt);
            }
        });

        btaPagi1b_radio.setText("-");
        btaPagi1b_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaPagi1b_radioItemStateChanged(evt);
            }
        });

        btaPagi1a_radio.setText("+");
        btaPagi1a_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaPagi1a_radioItemStateChanged(evt);
            }
        });

        btaSewaktu2a_radio.setText("+");
        btaSewaktu2a_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaSewaktu2a_radioItemStateChanged(evt);
            }
        });

        btaSewaktu2b_radio.setText("-");
        btaSewaktu2b_radio.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btaSewaktu2b_radioItemStateChanged(evt);
            }
        });

        jumlahBTA_Label.setText("Jumlah BTA priksa sebelumnya :");

        nilaiJumlahBTAlama_Label.setFont(new java.awt.Font("Tahoma", 0, 24));
        nilaiJumlahBTAlama_Label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        nilaiJumlahBTAlama_Label.setText("0");

        jumlahBTAbaruLabel.setText("Jumlah BTA baru :");

        nilaiJumlahBTAbaru_Label.setFont(new java.awt.Font("Tahoma", 0, 24));
        nilaiJumlahBTAbaru_Label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        nilaiJumlahBTAbaru_Label.setText("0");

        javax.swing.GroupLayout btA_pANELLayout = new javax.swing.GroupLayout(btA_pANEL);
        btA_pANEL.setLayout(btA_pANELLayout);
        btA_pANELLayout.setHorizontalGroup(
            btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(btA_pANELLayout.createSequentialGroup()
                .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jumlahBTA_Label)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, btA_pANELLayout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(nilaiJumlahBTAlama_Label)
                        .addGap(77, 77, 77)))
                .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(jumlahBTAbaruLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addComponent(nilaiJumlahBTAbaru_Label)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(btaSewaktu1_Label)
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addComponent(btaPagi_Label)
                        .addGap(70, 70, 70)
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(btA_pANELLayout.createSequentialGroup()
                                .addComponent(btaPagi1a_radio)
                                .addGap(18, 18, 18)
                                .addComponent(btaPagi1b_radio))
                            .addGroup(btA_pANELLayout.createSequentialGroup()
                                .addComponent(btaSewaktu1a_radio)
                                .addGap(18, 18, 18)
                                .addComponent(btaSewaktu1b_radio))))
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addComponent(btaSewaktu2_Label)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btaSewaktu2a_radio)
                        .addGap(18, 18, 18)
                        .addComponent(btaSewaktu2b_radio)))
                .addContainerGap(66, Short.MAX_VALUE))
        );
        btA_pANELLayout.setVerticalGroup(
            btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(btA_pANELLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btaSewaktu1_Label)
                            .addComponent(btaSewaktu1a_radio)
                            .addComponent(btaSewaktu1b_radio))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btaPagi_Label)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btaSewaktu2_Label)
                            .addComponent(btaSewaktu2b_radio)
                            .addComponent(btaSewaktu2a_radio)))
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btaPagi1b_radio)
                            .addComponent(btaPagi1a_radio)))
                    .addGroup(btA_pANELLayout.createSequentialGroup()
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jumlahBTA_Label)
                            .addComponent(jumlahBTAbaruLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(btA_pANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(nilaiJumlahBTAbaru_Label)
                            .addComponent(nilaiJumlahBTAlama_Label))))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jLabel4.setText("No. Reg Lab: ");

        javax.swing.GroupLayout cekLab_PanelLayout = new javax.swing.GroupLayout(cekLab_Panel);
        cekLab_Panel.setLayout(cekLab_PanelLayout);
        cekLab_PanelLayout.setHorizontalGroup(
            cekLab_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(cekLab_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(cekLab_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(cekLab_PanelLayout.createSequentialGroup()
                        .addComponent(btA_pANEL, javax.swing.GroupLayout.DEFAULT_SIZE, 578, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rontgen_Panel, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
                    .addGroup(cekLab_PanelLayout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nilai_NoRegLabText, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        cekLab_PanelLayout.setVerticalGroup(
            cekLab_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(cekLab_PanelLayout.createSequentialGroup()
                .addGroup(cekLab_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nilai_NoRegLabText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(cekLab_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rontgen_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btA_pANEL, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE))
                .addContainerGap())
        );

        saran_Panel.setBackground(new java.awt.Color(255, 255, 255));

        saran_Label.setFont(new java.awt.Font("Tahoma", 1, 14));
        saran_Label.setText("Saran");
        saran_Label.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        nilaiSaran_Label.setFont(new java.awt.Font("Tahoma", 3, 14));
        nilaiSaran_Label.setText("Saran_Untuk_Pasien");

        simpanSaran_Button.setText("Simpan");
        simpanSaran_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                simpanSaran_ButtonActionPerformed(evt);
            }
        });

        nilaiSaranPerbaikan_Label.setFont(new java.awt.Font("Tahoma", 3, 14));
        nilaiSaranPerbaikan_Label.setText("Evaluasi_Untuk_Pasien");

        javax.swing.GroupLayout saran_PanelLayout = new javax.swing.GroupLayout(saran_Panel);
        saran_Panel.setLayout(saran_PanelLayout);
        saran_PanelLayout.setHorizontalGroup(
            saran_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(saran_PanelLayout.createSequentialGroup()
                .addGroup(saran_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(saran_PanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(saran_Label)
                        .addGap(50, 50, 50)
                        .addComponent(nilaiSaran_Label, javax.swing.GroupLayout.DEFAULT_SIZE, 849, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, saran_PanelLayout.createSequentialGroup()
                        .addGap(100, 100, 100)
                        .addComponent(nilaiSaranPerbaikan_Label, javax.swing.GroupLayout.DEFAULT_SIZE, 849, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, saran_PanelLayout.createSequentialGroup()
                .addContainerGap(810, Short.MAX_VALUE)
                .addComponent(simpanSaran_Button)
                .addGap(82, 82, 82))
        );
        saran_PanelLayout.setVerticalGroup(
            saran_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(saran_PanelLayout.createSequentialGroup()
                .addGroup(saran_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(saran_Label)
                    .addComponent(nilaiSaran_Label))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(nilaiSaranPerbaikan_Label)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(simpanSaran_Button)
                .addContainerGap())
        );

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Hak Cipta © 2012 ATEI Software Foundation - Sistem Pembantu Diagnosa dan Pengawasan  Penyakit TBC penderita Dewasa");

        javax.swing.GroupLayout frame_PanelLayout = new javax.swing.GroupLayout(frame_Panel);
        frame_Panel.setLayout(frame_PanelLayout);
        frame_PanelLayout.setHorizontalGroup(
            frame_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(frame_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(frame_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, frame_PanelLayout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 961, Short.MAX_VALUE)
                        .addGap(8, 8, 8))
                    .addGroup(frame_PanelLayout.createSequentialGroup()
                        .addGroup(frame_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(header, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 959, Short.MAX_VALUE)
                            .addComponent(saran_Panel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(cekLab_Panel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 959, Short.MAX_VALUE))
                        .addContainerGap())
                    .addGroup(frame_PanelLayout.createSequentialGroup()
                        .addGroup(frame_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(gejala_Panel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 954, Short.MAX_VALUE)
                            .addComponent(pasien_Panel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        frame_PanelLayout.setVerticalGroup(
            frame_PanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(frame_PanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(header, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addComponent(pasien_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(gejala_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(1, 1, 1)
                .addComponent(cekLab_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(saran_Panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addContainerGap())
        );

        jScrollPane1.setViewportView(frame_Panel);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 988, Short.MAX_VALUE)
        );

        getAccessibleContext().setAccessibleParent(jScrollPane1);

        pack();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        java.awt.Dimension dialogSize = getSize();
        setLocation((screenSize.width-dialogSize.width)/2,(screenSize.height-dialogSize.height)/2);
    }// </editor-fold>//GEN-END:initComponents

    private void simpanSaran_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_simpanSaran_ButtonActionPerformed
        String pattern = ".{1,5}";
        if (btA_pANEL.isVisible() || rontgen_Panel.isVisible() || cekLab_Panel.isVisible()) {
            if (nilai_NoRegLabText.getText().matches(pattern)) {
                if (nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Negatif, kategori 1")
                        || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Positif, kategori 2")
                        || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Negatif, kategori 3")
                        || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Positif, kategori 1")) {
                    MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
                } else {
                    try {
                        // TODO add your handling code here:
                        //MainController.openPMOFrame(this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField);
                        List PMO = new ArrayList();
                        PMO = null;
                        try {
                            PMO = MainController.getPMO();
                        } catch (SQLException ex) {
                            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                        } catch (FileNotFoundException ex) {
                            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                        } catch (IOException ex) {
                            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                        }
                        System.out.println("size" + PMO.size());
                        if (!PMO.isEmpty()) {
                            MainController.insertRekamMedis(PMO.get(0).toString(), PMO.get(1).toString(), nilai_NoRegLabText.getText());
                            MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
                            MainController.cetakPrintOut(nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, PMO.get(0).toString(), PMO.get(1).toString(), nilaiSaran_Label);
                        } else {
                            MainController.insertRekamMedis(nilai_NoRegLabText);
                            MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
                        }
                    } catch (FileNotFoundException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (SQLException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }

                cancelGejala_Button.doClick();
                nilai_NoRegLabText.setText("");
                beratBadanText.setText("");
                simpanSaran_Button.setEnabled(false);
                sisaField.setText("");
                sisaField.setEditable(false);
            } else {
                JOptionPane.showMessageDialog(null, "Maaf format penulisan no. reg lab salah\nPenulisan terdiri dari 5 karakter apapun");
            }
        } else {
            if (nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Negatif, kategori 1")
                    || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Positif, kategori 2")
                    || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Negatif, kategori 3")
                    || nilaiSaran_Label.getText().equalsIgnoreCase("Tuberkulosis Paru BTA Positif, kategori 1")) {
                MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
            } else {
                try {
                    // TODO add your handling code here:
                    //MainController.openPMOFrame(this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField);
                    List PMO = new ArrayList();
                    PMO = null;
                    try {
                        PMO = MainController.getPMO();
                    } catch (SQLException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (FileNotFoundException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("size" + PMO.size());
                    if (!PMO.isEmpty()) {
                        MainController.insertRekamMedis(PMO.get(0).toString(), PMO.get(1).toString(), nilai_NoRegLabText.getText());
                        MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
                        MainController.cetakPrintOut(nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, PMO.get(0).toString(), PMO.get(1).toString(), nilaiSaran_Label);
                    } else {
                        MainController.insertRekamMedis(nilai_NoRegLabText);
                        MainController.simpanClicked(nilaiSaran_Label, this, nilaiNama_Label, nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField, nilai_NoRegLabText.getText().toString());
                    }
                } catch (FileNotFoundException ex) {
                    Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IOException ex) {
                    Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                } catch (SQLException ex) {
                    Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
                }
            }

            cancelGejala_Button.doClick();
            nilai_NoRegLabText.setText("");
            beratBadanText.setText("");
            simpanSaran_Button.setEnabled(false);
            sisaField.setText("");
            sisaField.setEditable(false);
        }
}//GEN-LAST:event_simpanSaran_ButtonActionPerformed

    private void gejala2_CheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gejala2_CheckBoxActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_gejala2_CheckBoxActionPerformed

    private void id_TextFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_id_TextFieldKeyPressed
        // TODO add your handling code here:
//        Pasien p=new Pasien();
//        try {
//            p.isExist(id_TextField.getText());
//        } catch (SQLException ex) {
//            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
//        }
        if (evt.getKeyCode() == KeyEvent.VK_ENTER) {
            nilaiSaran_Label.setText("Saran_Untuk_Pasien");
            nilaiSaranPerbaikan_Label.setText("");
            nilaiJumlahBTAbaru_Label.setText("0");
            nilaiJumlahBTAlama_Label.setText("0");
            bGroupBTA1.clearSelection();
            bGroupBTA2.clearSelection();
            bGroupBTA3.clearSelection();
            bGroupRongnt.clearSelection();
            rontgen_Panel.setVisible(false);
            btA_pANEL.setVisible(false);
            cekLab_Panel.setVisible(false);
            MainController.cariDataPasien(gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox,
                    gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox,
                    gejala8_CheckBox, gejala9_CheckBox, id_TextField, nilaiNama_Label,
                    nilaiAlamat_Label, nilaiJenisKelamin_Label, nilaitglLahir, nilaiUmurLabel,
                    nilaiBeratBadanLabel, rekamMedis_Table, notifikasiLabel, rekamMedis_Panel,
                    nilaiJumlahBTAlama_Label, nilaiHasilRontgen_Label, sisaField);
        }
    }//GEN-LAST:event_id_TextFieldKeyPressed

    private void cancelGejala_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelGejala_ButtonActionPerformed
        // TODO add your handling code here:
        MainController.cancel(gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox,
                gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox,
                gejala8_CheckBox, gejala9_CheckBox, rekamMedis_Panel, nilaiNama_Label,
                nilaiAlamat_Label, nilaiJenisKelamin_Label, id_TextField,
                nilaiJumlahBTAlama_Label, nilaiHasilRontgen_Label, rontgenA_radio,
                rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio,
                btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, nilaiJumlahBTAbaru_Label, bGroupBTA1, bGroupBTA2, bGroupBTA3,
                nilaitglLahir, nilaiUmurLabel, nilaiBeratBadanLabel, bGroupRongnt, nilaiSaranPerbaikan_Label);
        cekLab_Panel.setVisible(false);
        btA_pANEL.setVisible(false);
        rontgen_Panel.setVisible(false);
        nilaiSaran_Label.setText("Saran_Untuk_Pasien");
        notifikasiLabel.setVisible(false);
        nilai_NoRegLabText.setText("");
        beratBadanText.setText("");
        simpanSaran_Button.setEnabled(false);
        sisaField.setText("");
        sisaField.setEditable(false);
    }//GEN-LAST:event_cancelGejala_ButtonActionPerformed

    private void prosesGejala_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prosesGejala_ButtonActionPerformed
        simpanSaran_Button.setEnabled(true);
        if (beratBadanText.getText().matches("") || beratBadanText.getText().toString().matches("null")
                || beratBadanText.getText() == null || beratBadanText.getText().equalsIgnoreCase("kg")) {
            JOptionPane.showMessageDialog(this, "Berat badan belum diisi");
        } else {
            try {
                // TODO add your handling code here:
                MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
                if (btA_pANEL.isVisible() || rontgen_Panel.isVisible()) {
                    cekLab_Panel.setVisible(true);
                } else {
                    cekLab_Panel.setVisible(false);
                }
            } catch (FileNotFoundException ex) {
                Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SQLException ex) {
                Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_prosesGejala_ButtonActionPerformed

    private void btaSewaktu1a_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaSewaktu1a_radioItemStateChanged
        try {
            MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            // TODO add your handling code here:
            //MainController.setSaran(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaSewaktu1a_radioItemStateChanged

    private void btaPagi1a_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaPagi1a_radioItemStateChanged
        MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
        try {
            // TODO add your handling code here:

            //MainController.setSaran(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaPagi1a_radioItemStateChanged

    private void btaSewaktu2a_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaSewaktu2a_radioItemStateChanged
        MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
        try {
            // TODO add your handling code here:
            //MainController.setSaran(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaSewaktu2a_radioItemStateChanged

    private void rontgenA_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rontgenA_radioItemStateChanged
        try {
            // TODO add your handling code here:
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_rontgenA_radioItemStateChanged

    private void rontgenB_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rontgenB_radioItemStateChanged
        try {
            // TODO add your handling code here:
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_rontgenB_radioItemStateChanged

    private void comboBox_ParuItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_comboBox_ParuItemStateChanged
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_comboBox_ParuItemStateChanged

    private void id_TextFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_id_TextFieldKeyTyped
//    if (Character.isDigit((evt.getKeyChar()))) {
//            evt.consume();
//            JOptionPane.showMessageDialog(null, "Inputkan ID sesuai format PU-JEBED-xxx");
//            id_TextField.setText("");
//
//    }
    }//GEN-LAST:event_id_TextFieldKeyTyped

    private void beratBadanTextFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_beratBadanTextFocusGained
        // TODO add your handling code here:
        if (beratBadanText.getText().matches("Kg")) {
            beratBadanText.setText("");
        }
    }//GEN-LAST:event_beratBadanTextFocusGained

    private void btaSewaktu1b_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaSewaktu1b_radioItemStateChanged
        // TODO add your handling code here:
        try {
            MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaSewaktu1b_radioItemStateChanged

    private void btaPagi1b_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaPagi1b_radioItemStateChanged
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaPagi1b_radioItemStateChanged

    private void btaSewaktu2b_radioItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btaSewaktu2b_radioItemStateChanged
        // TODO add your handling code here:
        try {
            // TODO add your handling code here:
            MainController.optionBTAFull(nilaiJumlahBTAbaru_Label, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio);
            MainController.setSaranBaru(nilaiHasilRontgen_Label, nilaiSaran_Label, nilaiSaranPerbaikan_Label, nilaiJumlahBTAlama_Label, nilaiJumlahBTAbaru_Label, rontgenA_radio, rontgenB_radio, btaSewaktu1a_radio, btaSewaktu1b_radio, btaSewaktu2a_radio, btaSewaktu2b_radio, btaPagi1a_radio, btaPagi1b_radio, comboBox_Paru, btA_pANEL, rontgen_Panel, gejala1_CheckBox, gejala2_CheckBox, gejala3_CheckBox, gejala4_CheckBox, gejala5_CheckBox, gejala6_CheckBox, gejala7_CheckBox, gejala8_CheckBox, gejala9_CheckBox, beratBadanText, nilai_NoRegLabText, sisaField);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Interface_Pasien.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_btaSewaktu2b_radioItemStateChanged

    private void beratBadanTextKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_beratBadanTextKeyReleased
        // TODO add your handling code here:
        if (!beratBadanText.getText().matches("[0-9]*")) {
            JOptionPane.showMessageDialog(this, "berat badan harus berupa angka");
            beratBadanText.setText(beratBadanText.getText().substring(0, beratBadanText.getText().length() - 1));
        }
    }//GEN-LAST:event_beratBadanTextKeyReleased

    private void sisaFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_sisaFieldKeyReleased
        // TODO add your handling code here:
        if (!sisaField.getText().matches("[0-9]*")) {
            JOptionPane.showMessageDialog(this, "sisa obat harus berupa angka");
            sisaField.setText(sisaField.getText().substring(0, sisaField.getText().length() - 1));
        }
    }//GEN-LAST:event_sisaFieldKeyReleased

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Interface_Pasien().setVisible(true);
            }
        });
    }
    private javax.swing.ButtonGroup bGroupBTA1 = new javax.swing.ButtonGroup();
    private javax.swing.ButtonGroup bGroupBTA2 = new javax.swing.ButtonGroup();
    private javax.swing.ButtonGroup bGroupBTA3 = new javax.swing.ButtonGroup();
    private javax.swing.ButtonGroup bGroupRongnt = new javax.swing.ButtonGroup();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel alamat_Label;
    private javax.swing.JLabel beratBadanLabel;
    private javax.swing.JTextField beratBadanText;
    private javax.swing.JLabel berat_badan_label;
    private javax.swing.JPanel btA_pANEL;
    private javax.swing.JRadioButton btaPagi1a_radio;
    private javax.swing.JRadioButton btaPagi1b_radio;
    private javax.swing.JLabel btaPagi_Label;
    private javax.swing.JLabel btaSewaktu1_Label;
    private javax.swing.JRadioButton btaSewaktu1a_radio;
    private javax.swing.JRadioButton btaSewaktu1b_radio;
    private javax.swing.JLabel btaSewaktu2_Label;
    private javax.swing.JRadioButton btaSewaktu2a_radio;
    private javax.swing.JRadioButton btaSewaktu2b_radio;
    private javax.swing.JButton cancelGejala_Button;
    private javax.swing.JPanel cekLab_Panel;
    private javax.swing.JComboBox comboBox_Paru;
    private javax.swing.JPanel frame_Panel;
    private javax.swing.JCheckBox gejala1_CheckBox;
    private javax.swing.JCheckBox gejala2_CheckBox;
    private javax.swing.JCheckBox gejala3_CheckBox;
    private javax.swing.JCheckBox gejala4_CheckBox;
    private javax.swing.JCheckBox gejala5_CheckBox;
    private javax.swing.JCheckBox gejala6_CheckBox;
    private javax.swing.JCheckBox gejala7_CheckBox;
    private javax.swing.JCheckBox gejala8_CheckBox;
    private javax.swing.JCheckBox gejala9_CheckBox;
    private javax.swing.JPanel gejala_Panel;
    private javax.swing.JPanel header;
    private javax.swing.JLabel id_Label;
    private javax.swing.JTextField id_TextField;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JLabel jenisKelamin_Label;
    private javax.swing.JLabel jumlahBTA_Label;
    private javax.swing.JLabel jumlahBTAbaruLabel;
    private javax.swing.JSeparator lineGejala_Separator;
    private javax.swing.JLabel nama_Label;
    private javax.swing.JLabel nilaiAlamat_Label;
    private javax.swing.JLabel nilaiBeratBadanLabel;
    private javax.swing.JLabel nilaiHasilRontgen_Label;
    private javax.swing.JLabel nilaiJenisKelamin_Label;
    private javax.swing.JLabel nilaiJumlahBTAbaru_Label;
    private javax.swing.JLabel nilaiJumlahBTAlama_Label;
    private javax.swing.JLabel nilaiNama_Label;
    private javax.swing.JLabel nilaiSaranPerbaikan_Label;
    private javax.swing.JLabel nilaiSaran_Label;
    private javax.swing.JLabel nilaiUmurLabel;
    private javax.swing.JTextField nilai_NoRegLabText;
    private javax.swing.JLabel nilaitglLahir;
    private javax.swing.JLabel notifikasiLabel;
    private javax.swing.JPanel pasien_Panel;
    private javax.swing.JLabel pesanRontgen_Label;
    private javax.swing.JButton prosesGejala_Button;
    private javax.swing.JPanel rekamMedis_Panel;
    private javax.swing.JTable rekamMedis_Table;
    private javax.swing.JRadioButton rontgenA_radio;
    private javax.swing.JRadioButton rontgenB_radio;
    private javax.swing.JPanel rontgen_Panel;
    private javax.swing.JLabel saran_Label;
    private javax.swing.JPanel saran_Panel;
    private javax.swing.JButton simpanSaran_Button;
    private javax.swing.JLabel sisa;
    private javax.swing.JTextField sisaField;
    private javax.swing.JLabel tanggal_lahir_label;
    private javax.swing.JLabel title_Label;
    private javax.swing.JLabel umur_label;
    // End of variables declaration//GEN-END:variables
}
